#include <utl/memory.h>
#include <mimalloc.h>

namespace utl
{
	namespace _internal
	{
		/*struct HEAP_DELETER
		{
			void operator()(mi_heap_t* ptr)const noexcept
			{
				mi_heap_destroy(ptr);
			}
		};

		using heap_ptr = eastl::unique_ptr<mi_heap_t, HEAP_DELETER>;

		static heap_ptr& get_heap_ptr()
		{
			static heap_ptr hp{ mi_heap_new() };
			return hp;
		}*/

		void* utl_mem_alloc(size_t size)
		{
			return mi_malloc(size);
		}

		void utl_free(void* ptr)
		{
			mi_free(ptr);
		}
	}
}